home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
gamesrc
/
arasan_s
/
book.h
< prev
next >
Wrap
C/C++ Source or Header
|
1993-11-19
|
1KB
|
46 lines
// Copyright 1992-3 by Jon Dart. All Rights Reserved.
#ifndef _BOOK_H
#define _BOOK_H
#include "bookread.h"
#include "log.h"
class Book
{
// interface to the opening book.
public:
Book();
~Book();
Move book_move( const Board &b );
// Returns a "book move" if there is one, NullMove otherwise.
// NOTE: the promotion field of book_move may be wrong;
// we don't set it.
unsigned book_moves( const Board &b, Move *moves,
const unsigned limit);
// Fills array "moves" with a list of all the book moves for
// the given position. Moves are sorted in decreasing order
// of "goodness". Moves that are not recommended at all are
// are not included. "limit" is the maximum number of moves
// that can be stored in "moves". The return value is the
// number actually stored.
private:
Boolean find_move( const Move &target, unsigned &node);
Move pick( const Board &b, uint16 node_index,
const Book_Entry &node );
Book_Reader *bookw;
Book_Reader *bookb;
};
#endif